/**
 * TorrentJEDI
 * 		Torrent Java Episode Download Interface
 */
package torrentjedi.core;

import java.util.List;

/**
 * @author Alper Kokmen
 * 
 */
public class RSSChannel {
	private String title;
	private String link;
	private String description;
	
	private String language;
	private String pubDate;
	private String lastBuildDate;
	private String generator;
	private String managingEditor;
	private String webMaster;
	
	private List<RSSItem> items;

	/**
	 * default constructor
	 * 		fields will be set manually at the time of instantiation
	 */
	public RSSChannel() {
		super();
	}

	/**
	 * @return the title
	 */
	public String getTitle() {
		return title;
	}

	/**
	 * @param title the title to set
	 */
	public void setTitle(String title) {
		this.title = title;
	}

	/**
	 * @return the link
	 */
	public String getLink() {
		return link;
	}

	/**
	 * @param link the link to set
	 */
	public void setLink(String link) {
		this.link = link;
	}

	/**
	 * @return the description
	 */
	public String getDescription() {
		return description;
	}

	/**
	 * @param description the description to set
	 */
	public void setDescription(String description) {
		this.description = description;
	}

	/**
	 * @return the language
	 */
	public String getLanguage() {
		return language;
	}

	/**
	 * @param language the language to set
	 */
	public void setLanguage(String language) {
		this.language = language;
	}

	/**
	 * @return the pubDate
	 */
	public String getPubDate() {
		return pubDate;
	}

	/**
	 * @param pubDate the pubDate to set
	 */
	public void setPubDate(String pubDate) {
		this.pubDate = pubDate;
	}

	/**
	 * @return the lastBuildDate
	 */
	public String getLastBuildDate() {
		return lastBuildDate;
	}

	/**
	 * @param lastBuildDate the lastBuildDate to set
	 */
	public void setLastBuildDate(String lastBuildDate) {
		this.lastBuildDate = lastBuildDate;
	}

	/**
	 * @return the generator
	 */
	public String getGenerator() {
		return generator;
	}

	/**
	 * @param generator the generator to set
	 */
	public void setGenerator(String generator) {
		this.generator = generator;
	}

	/**
	 * @return the managingEditor
	 */
	public String getManagingEditor() {
		return managingEditor;
	}

	/**
	 * @param managingEditor the managingEditor to set
	 */
	public void setManagingEditor(String managingEditor) {
		this.managingEditor = managingEditor;
	}

	/**
	 * @return the webMaster
	 */
	public String getWebMaster() {
		return webMaster;
	}

	/**
	 * @param webMaster the webMaster to set
	 */
	public void setWebMaster(String webMaster) {
		this.webMaster = webMaster;
	}

	/**
	 * @return the items
	 */
	public List<RSSItem> getItems() {
		return items;
	}

	/**
	 * @param items the items to set
	 */
	public void setItems(List<RSSItem> items) {
		this.items = items;
	}

	@Override
	public String toString() {
		String returnValue = "\tTitle: " + getTitle() + "\n"
							+ "\tDescription: " + getDescription() + "\n"
							+ "\tLink: " + getLink() + "\n"
							+ "\tPublication Date: " + getPubDate() + "\n"
							+ "\tLanguage: " + getLanguage() + "\n"
							+ "\tItem Count: " + getItems().size();
		
		for (RSSItem item : getItems()) {
			returnValue += "\t- Item Title: " + item.getTitle() + "\n";
		}
		
		return returnValue;
	}

}
